﻿@model MobileWeb.Models.SearchModel

@{    
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>pregled svih stanova</h2>
<div id="pregledStanovaInput">
    @using (Html.BeginForm()){
        <table>
            <tr>
                <td>
                    Površina:
                </td>
                <td>
                    @Html.DropDownListFor(model => model.SelectedArea, new SelectList(Model.Areas,"Id","Name"))    
                </td>
            </tr>
            <tr>
                <td>
                    Kat:
                </td>
                <td>
                    @Html.DropDownListFor(model => model.SelectedFloor, new SelectList(Model.Floors,"Id","Name"))
                </td>
            </tr>
            <tr>
                <td>
                    Broj soba:
                </td>
                <td>
                    @Html.DropDownListFor(model => model.SelectedNumOfRooms, new SelectList(Model.NumOfRooms,"Id","Name"))
                </td>
            </tr>
            <tr>
                <td>
                    Ukupna cijena: 
                </td>
                <td>
                    @Html.DropDownListFor(model => model.SelectedPrice, new SelectList(Model.Prices,"Id","Name"))
                </td>
            </tr>
            <tr>
                <td>
                
                </td>
                <td align="right">
                    <input type="submit" value="Pretraži" />
                </td>
            </tr>
        </table>          
    }    
</div>
<div class="scrollWrapper">
<table id="pregledStanovaTable">
    <thead>
        <tr>
            <th>Površina</th>
            <th>Kat</th>
            <th>Broj soba</th>
            <th>Cijena</th>
            <th>Ukupna cijena</th>
        </tr>
    </thead>
    <tbody>
    @foreach (var apartment in Model.Apartments) {             
        <tr>
            <td>
                <a href="/Stanovi/Detalji/@apartment.Id">
                    @String.Format("{0:n}", apartment.Area) m2
                </a>
            </td>
            <td>
                <a href="/Stanovi/Detalji/@apartment.Id">
                    @apartment.Floor
                </a>
            </td>
            <td>
                <a href="/Stanovi/Detalji/@apartment.Id">
                    @apartment.NumOfRooms
                </a>
            </td>
            <td>
                <a href="/Stanovi/Detalji/@apartment.Id">
                    @String.Format("{0:n}", apartment.Price) EUR/m2
                </a>
            </td>
            <td>
                <a href="/Stanovi/Detalji/@apartment.Id">
                    @String.Format("{0:n}", apartment.TotalPrice) EUR
                </a>
            </td>
        </tr>      
    }
    </tbody>
</table>
</div>
<table id="pregledStanovaLinksTb">
    <tr>
        <td align="left">
            <a href="/Stanovi/RabatnaSkala">
                <img src="/Content/Images/rabatnaSkalaCircle.png" alt="" />
            </a>
        </td>
        <td align="center">
            <a href="/Stanovi/Kreditiranje">
                <img src="/Content/Images/uvjetiKredCircle.vsd.png" alt="" />
            </a>
        </td>
        <td align="center">
            <a href="/Stanovi/Karakteristicni">
                <img src="/Content/Images/karakterStanoviCircle.png" alt="" />
            </a>        
        </td>
        <td align="right">
            <a href="/Stanovi/Kontakt">
                <img src="/Content/Images/kontakt1Circle.png" alt="" />
            </a>        
        </td>
    </tr>
</table>

